package cn.kxm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.kxm.dao.CompanyMapper;
import cn.kxm.pojo.Company;
import cn.kxm.service.CompanyService;
@Service
public class CompanyServiceImpl implements CompanyService{

    @Autowired
	private CompanyMapper companyMapper;
    
	@Override
	public List<Company> getCompanys(List<Integer> types, String name,
			String code, Integer page, Integer size) {
		Integer currPage=(page-1)*size;
		return companyMapper.getCompanys(types, name, code, currPage, size);
	}

	@Override
	public int getCompanyCount(List<Integer> types, String name, String code) {
		return companyMapper.getCompanyCount(types, name, code);
	}
	


	
	@Override
	public List<Company> getCompanyAll(Company company, Integer pageSize,
			Integer currentPageNo) {
	
		return companyMapper.getCompanyAll(company,pageSize,(currentPageNo-1)*pageSize);
	}
	@Override
	public int getCompanyCountt(Company company) {
		
		return companyMapper.getCompanyCountt(company);
	}


}
